package com.zhuhjay.service.system.model.vo;

import com.zhuhjay.service.system.model.entity.SystemUser;
import lombok.Data;

import java.io.Serializable;

/**
 * @author ZhuHJay
 * @date 2023/7/11 19:24
 */
@Data
public class ChatUserOnlineVo implements Serializable {

    private String username;
    private String avatar;

    public static ChatUserOnlineVo toVo(SystemUser user) {
        ChatUserOnlineVo userOnlineVo = new ChatUserOnlineVo();
        userOnlineVo.setUsername(user.getUsername());
        userOnlineVo.setAvatar(user.getAvatar());
        return userOnlineVo;
    }

}
